package com.un.ebs.sys.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.un.ebs.sys.domain.AppPower;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author liubo
 * @since 2019-09-18
 */
public interface AppPowerMapper extends BaseMapper<AppPower> {
    @Select("select isnull(max(sort)+1,1) from sys_app_power")
    int maxSort();

    @Select("select isnull(max(sort)+1,1) from sys_app_power where parent_id=#{parentId}")
    int maxSortByParentId(@Param("parentId") String parentId);

}
